package org.sample.springbootasync;

import org.sample.springbootasync.config.ExecutorConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@ComponentScan("org.sample.springbootasync")
@PropertySource(value = { "config/application.properties" })
@EnableAsync
public class Application {

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}

	@Bean
	public ExecutorConfig getExecutorConfig() {
		return new ExecutorConfig();
	}

}
